#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

signed main() {
	int t;
	cin >> t;
	while(t -- ) {
		int n;
		cin >> n;
		for(int i = 1; i <= n; i ++ ) {
			if(i % 2) {
				cout << 1 << " ";
			} else {
				cout << 2 << " "; 
			}
		}
		cout << endl;
	}
	return 0;
}

